design-mode vs test-mode
At any point during design, you can toggle the design window back and forth between
DesignMode and TestMode with the CheckBox at the top of the toolkit.
In design mode you select grids from the toolkit, lay them out in the design window, and
assign appearance properties to them.
In test mode, grids in the design window will operate much as they will in your program.
Actions in the design window that would cause callback messages print information to the
console window for preliminary inspection.
Window ToFunction
When you want to convert a design window into a grid function and callback function,
select W indow T oFunction in the toolkit Menu.
GuiDesigner creates code to create, operate, and respond to the window, and adds it to
your program, or updates the current contents.
The callback function is displayed in the lower text area of the program development
environment.
quick start
Believe it or not, you can run your program right away, even though you haven't written a
line of code. GuiDesigner puts a line of code in callback functions to display the
arguments of every message it receives in a ReportMessage window. So go ahead. Click the
Start button to compile and execute your program. When your design windows appear, play
with it and watch the ReportMessage window.
callback arguments
The primary arguments to the callback function are the Callback message in message , the
original message in r1 , and a kid number in kid or r0 . Most callbacks contain a
Selection message in r1 . The kid number in kid or r0 tells which kid initiated the
callback. To respond to a particular event, add code to the callback function to process
the arguments you see printed in the Report window.
Activate a grid in the window, see what's printed in the console, then add code to the
code function to process it. When you add code to callback functions, be sure to write kid
number constants, not the literal kid numbers printed in the console. The kid number
constants are defined near the top of callback functions.
You'll probably execute different code for each message,kid .